#include "q_data.h"
#include "q_login.h"
#include "system.h"
#include "ui_q_login.h"

Q_login::Q_login(QWidget* parent) :
    QWidget(parent),
    ui(new Ui::Q_login)
{
    ui->setupUi(this);
}

Q_login::~Q_login()
{
    delete ui;
}

void Q_login::on_pushButtonLogin_clicked()
{
    qDebug() << "确定按钮被点击了";
    QString username = ui->AccountNumber->text();
    QString passwd = ui->Password->text();
    if(username == "admin" && passwd == "123456")
    {
        qDebug() << "登录成功！！！";
        Q_data* m = new Q_data();
        m->show();
        this->close();
    }
    else
    {
        qDebug() << "登录失败！！！";
    }

    qDebug() << ui->AccountNumber->text();
    qDebug() << ui->Password->text();
}

void Q_login::on_pushButtonEnroll_clicked()
{
    System* m = new System();
    m->show();
    this->close();
}

